// dlg.txt

//	mark_quest_dest(zone,x,y,layer,quest);
//	cancel_out_fight(0,short kill_enc)
//	make_outdoor_enc(short x,short y,short which_enc);
//	set_out_fight_field(short which_field);

begintalkscript;

variables;

short this_sec = 63;

begintalknode;
	tag = 1;
	condition = get_sdf(100 + this_sec,1) == 0;
	text1 = "The narrow valley opens up into a vast, dense forest. The trees are old and a bright, vivid green. They tower above you, pressing in on you. The forest feels alive and awake in a way you haven't experienced since Sacramentum.";
	text2 = "Every step you take, you feel you are being watched. There is an energy here. Constant, faint, and hostile. Most travelers would be bothered by it. It's nothing you haven't experienced before. It certainly doesn't affect you.";
	text3 = "This is the Kranas Woods, one of the four provinces of the Rokaj. There is a guardpost not far to the west, doubtless here to watch for raiders from other parts of the Ro.";
	code =
		sf(100 + this_sec,1,1);
		if (gf(80,8) == 0)
			sf(80,8,1);
	break;
	
begintalknode;
	tag = 2;
	condition = get_sdf(100 + this_sec,2) == 0;
	text1 = "You are close to a fortress on the east side of the river. Unlike the cities of the Rokaj, it has walls. Heavy wood battlements, ready to repel whatever stray groups of raiders come to bother you.";
	text2 = "This is a fort of Haven. It is in poor repair, and the camps outside are notably short on soldiers. It is waiting to be reclaimed and restored. Hopefully, the soldiers inside are ready for you.";
	code =
		sf(100 + this_sec,2,1);
	break;

begintalknode;
	tag = 3;
	condition = get_sdf(100 + this_sec,3) == 0;
	text1 = "You find the heavily decomposed body of a Ro warrior. You can't tell anything about where he or she was from. There isn't a lot left. The armor has rotted away, and the weapon is broken.";
	text2 = "Maybe this was a scout or raider, who was poisoned by a snake and crawled here to expire.";
	text3 = "While none of the equipment on the body is intact, you find a nice shield under some nearby undergrowth.";
	code =
		sf(100 + this_sec,3,1);
		reward_give(119);
	break;

begintalknode;
	tag = 4;
	condition = get_sdf(100 + this_sec,4) == 0;
	text1 = "As you walk through the forest, a heavy wind begins to blow. You hear the rustling of leaves and the snapping of twigs.";
	code =
		sf(100 + this_sec,4,1);
		set_terrain(0,162,321,118);
		set_terrain(0,162,322,118);
		set_terrain(0,168,320,118);
		set_terrain(0,168,323,118);
		set_terrain(0,166,319,0);
		set_terrain(0,168,325,0);
	break;

begintalknode;
	tag = 5;
	condition = get_sdf(100 + this_sec,5) == 0 && get_ran(1,0,100) < 50;
	text1 = "For a moment, you feel a deep sense of panic. Someone is definitely watching you. The trees are crowding in on you. The foliage overhead blocks out the light.";
	text2 = "You stop and take a deep breath. The feeling fades. The forest returns to normal.";
	code =
		sf(100 + this_sec,5,1);
	break;

begintalknode;
	tag = 6;
	condition = get_sdf(100 + this_sec,6) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,6,1);
	break;

begintalknode;
	tag = 7;
	condition = get_sdf(100 + this_sec,7) == 0;
	text1 = "How strange. You find a patch of blighted ground. The grass and trees are dead. There is a faint, scorched smell in the air.";
	text2 = "You see no reason why this land died. No sign of battle. No nearby settlements. It just grew ill. Just the sort of thing to cause the local druids to grow worried. Or angry.";
	code =
		sf(100 + this_sec,7,1);
	break;

begintalknode;
	tag = 8;
	condition = get_sdf(100 + this_sec,8) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,8,1);
	break;

begintalknode;
	tag = 9;
	condition = get_sdf(100 + this_sec,9) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,9,1);
	break;

begintalknode;
	tag = 10;
	condition = get_sdf(100 + this_sec,10) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,10,1);
	break;

begintalknode;
	tag = 11;
	condition = get_sdf(100 + this_sec,11) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,11,1);
	break;

begintalknode;
	tag = 12;
	condition = get_sdf(100 + this_sec,12) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,12,1);
	break;

// MIXED

begintalknode;
	tag = 13;
	condition = gf(163,12) == 0;
	text1 = "You meet a band of Havenite soldiers, camped outside the fortress. They knew you were here, of course, but the reality of having actual royalty in front of them comes as quite a shock.";
	text2 = "You note the poor quality of their equipment and the raggedness of their formations. They prepared for your arrival as best they could, but they are a disappointing crew.";
	text3 = "They tell you that the Chief of [F1] is waiting for you, in the main hall inside the fort.";
	code =
		sf(163,12,1);
	break;

begintalknode;
	tag = 14;
	condition = gf(163,15) == 0;
	text1 = "A band of Kranas warriors is patrolling this road. When they realize who you are, they step off of the road and politely let you pass. No conversation is offered.";
	code =
		sf(163,15,1);
	break;

begintalknode;
	tag = 15;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 16;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 17;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 18;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 19;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 20;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 21;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 22;
	condition = 1;
	text1 = "__";


begintalknode;
	tag = 30;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "There is a large band of fierce Kranas warriors guarding the entrance to their province. Some wait in the watchtowers. Others guard the road. All of them watch alertly for raiders from the Low Dhaga, their most frequent attacker.";
	text2 = "They move to block your path, weapons in hand until they realize who you are. Then they sheathe their weapons and are far more polite. Their leader says, _Welcome, envoy of Haven. We knew you were coming._";
	text3 = "_Are you allowed to be here? Have you received permission to travel the Pilgrimage Road?_";
	text4 = "They are friendly, once they recognize you. They offer you a spot by their fire, to rest on your journey.";
	text5 = "Once they recognize you, they grow very nervous. They don't offer you a chance to rest by their fire.";
	code =
		cs(); as(1);
		if (gf(163,11) == 0) {
			as(2); as(3);
			}
			else if (gf(80,12) >= 8)
				as(5);
				else as(4);
	break;
	
begintalknode;
	state = 10;
	nextstate = -1;
	condition = gf(163,11) == 0 && gf(10,11) == 0;
	question = "_I have not yet gotten permission._";
	text1 = "The guards are nervous about confronting you, but they don't back down. _Our apologies, envoy of Haven. You may not travel into the inner provinces without our permission. You can get it from the Raasa of Laskara, to the south._";
	text2 = "They return to their fire. They gave you the message they were supposed to, but they aren't going to fight to keep you out.";
	code =
		sf(163,11,1);
	break;

begintalknode;
	state = 10;
	nextstate = -1;
	condition = gf(163,11) == 0;
	question = "_I am a [P] of Haven. I go where I want to._";
	text1 = "The guards nod, as if this is entirely reasonable. However, you can detect the anger in their eyes. _Our apologies, envoy of Haven. You were supposed to get permission from the Raasa of Laskara, to the south. Of course, you know best._";
	text2 = "They return to their fire. They gave you the message they were supposed to, but they aren't going to fight to keep you out.";
	code =
		ro_faction(-2);
		sf(163,11,1);
	break;

begintalknode;
	state = 10;
	nextstate = -1;
	condition = gf(163,11) == 0 && gf(10,11) > 0;
	question = "_I received permission from Raasa Elha._";
	text1 = "The warriors nod. _Then we welcome you to the Kranas Woods. It is an honor to host Havenites._ Did you detect a slight hint of derision?";
	text2 = "_Before you go, you may rest by our fire._";
	code =
		ro_faction(1);
		sf(163,11,1);
	break;
	
begintalknode;
	state = 10;
	nextstate = 11;
	condition = gf(163,11) > 0 && gf(80,12) < 8;
	question = "_Tell me about the Kranas Woods._";
	text1 = "_Our forest is our home and our protector. We don't burn any wood that is not given, and we earn our livings digging under the earth, where the trees are not bothered._";

begintalknode;
	state = 11;
	nextstate = 10;
	condition = 1;
	question = "_Help me find my way around._";
	text1 = "_Haven's fort, [F1], is not far from here. Ssilyn, the largest city nearby, is across the river to the west. You may enter the north half of the Kranas Woods through the Ruska Pass, to the northwest._";
	text3 = "_Our Raasa is in Ssilyn. You will be welcomed there._";
	
begintalknode;
	state = 10;
	nextstate = -1;
	condition = gf(163,11) > 0 && gf(80,12) < 8 && gf(80,8) < 4;
	question = "_Any recent events I should know about?_";
	text1 = "_Only your arrival. We know that the Low Dhaga sent raiders after you. It is their way. They raid everybody. Things have been quiet here. Haven has looked after us well._";
	text2 = "Something about his tone of voice sets your nerves on edge.";
		
begintalknode;
	state = 10;
	nextstate = -1;
	condition = gf(163,11) > 0 && gf(80,12) < 8 && gf(80,8) >= 4;
	question = "_Any events I should know about?_";
	text1 = "_Our Raasa has been killed. Struck down in Ssilyn. It is a sad time. Yet, we know Haven watches over us. Constantly._";

begintalknode;
	state = 10;
	nextstate = -1;
	condition = gf(163,11) > 0 && gf(80,12) >= 8;
	question = "_I would like to talk to you._";
	text1 = "The warriors don't want to talk. Something has made them very nervous. Perhaps word of the challenge you received has spread.";
	text2 = "They make little conversation and offer no hospitality.";

begintalknode;
	state = 10;
	nextstate = -1;
	condition = gf(163,11) > 0;
	question = "_This forest seems strange to me._";
	text1 = "_Yes. It is alive, like we are alive. The sacred groves are its mind and its heart._";
	text2 = "_You may visit them. Haven may go anywhere._";

begintalknode;
	state = 10;
	nextstate = -1;
	condition = gf(163,11) > 0;
	question = "_Goodbye._";
	text1 = "The guards give you a polite, distant farewell.";
	action = END_TALK;
	
	
//

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 40;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

	
//

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";


//

begintalknode;
	tag = 100;
	state = -1;
	nextstate = 100;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 100;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 130;
	state = -1;
	nextstate = 130;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 130;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 160;
	state = -1;
	nextstate = 160;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 160;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
		
//

begintalknode;
	tag = 190;
	state = -1;
	nextstate = 190;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 190;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
				